<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>KingDove's轻阅读服务</title>
    <link rel="icon" href="https://static.codemao.cn/1273547626/rkjuY2U4ex.svg" type="image/svg+xml">
    <script src="https://cdn.tailwindcss.com/3.3.3"></script>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css">
    <style>
        :root {
            --primary-color: #6366f1;
            --secondary-color: #8b5cf6;
            --light-color: #f9fafb;
            --dark-color: #1e293b;
        }
        
        body {
            font-family: 'Inter', system-ui, -apple-system, sans-serif;
            background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
            color: var(--dark-color);
            min-height: 100vh;
            line-height: 1.5;
        }
        
        .container {
            width: 100%;
            max-width: 1200px;
            margin: 0 auto;
            padding: 1rem;
        }
        
        .glassmorphism {
            background: rgba(255, 255, 255, 0.9);
            backdrop-filter: blur(10px);
            border-radius: 12px;
            border: 1px solid rgba(255, 255, 255, 0.3);
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
        }
        
        .tab-active {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
            color: white;
            box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.3);
        }
        
        .highlight-box {
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
            border-left: 4px solid var(--primary-color);
            transition: all 0.3s ease;
            cursor: pointer;
        }
        
        .highlight-box:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.2);
        }
        
        .refresh-btn {
            background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
            transition: all 0.3s ease;
            width: 100%;
            max-width: 200px;
        }
        
        .refresh-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 15px -3px rgba(99, 102, 241, 0.3);
        }

        /* 手动获取部分样式 */
        .manual-section {
            margin-top: 2rem;
            padding: 1.5rem;
            background-color: rgba(239, 68, 68, 0.05);
            border-radius: 0.5rem;
            border-left: 4px solid #ef4444;
        }
        
        .step {
            margin-bottom: 1.5rem;
            padding: 1rem;
            background-color: white;
            border-radius: 0.375rem;
            border-left: 4px solid #3498db;
        }
        
        .step-number {
            display: inline-block;
            width: 1.75rem;
            height: 1.75rem;
            background-color: #3498db;
            color: white;
            text-align: center;
            border-radius: 50%;
            margin-right: 0.75rem;
            font-weight: bold;
            line-height: 1.75rem;
        }
        
        .link-box {
            padding: 0.75rem;
            background-color: #f3f4f6;
            border-radius: 0.375rem;
            margin: 1rem 0;
            word-break: break-all;
            font-family: monospace;
        }
        
        .manual-btn {
            display: inline-block;
            padding: 0.5rem 1rem;
            background-color: #3498db;
            color: white;
            text-decoration: none;
            border-radius: 0.375rem;
            margin: 0.5rem 0;
            transition: background-color 0.3s;
            border: none;
            cursor: pointer;
        }
        
        .manual-btn:hover {
            background-color: #2980b9;
        }

        .download-btn {
            background-color: #10b981;
        }
        
        .download-btn:hover {
            background-color: #059669;
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            .container {
                padding: 0.5rem;
            }
            
            .nav-tabs {
                flex-direction: column;
            }
            
            .nav-tabs button {
                width: 100%;
                margin-bottom: 0.5rem;
            }
            
            .highlight-box {
                padding: 1rem;
            }
        }
        
        /* 发行版本样式 */
        .release-container {
            border: 1px solid #e5e7eb;
            border-radius: 0.5rem;
            overflow: hidden;
            margin-bottom: 1rem;
        }
        
        .release-header {
            background-color: var(--light-color);
            padding: 1rem;
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: background-color 0.2s;
        }
        
        .release-header:hover {
            background-color: #f3f4f6;
        }
        
        .release-title {
            font-weight: 600;
            color: var(--primary-color);
            display: flex;
            align-items: center;
        }
        
        .release-date {
            color: #6b7280;
            font-size: 0.875rem;
        }
        
        .release-icon {
            transition: transform 0.3s;
        }
        
        .release-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease-out;
            background-color: white;
        }
        
        .release-content.expanded {
            max-height: 5000px;
            transition: max-height 0.5s ease-in;
        }
        
        .release-notes {
            padding: 1rem;
            border-bottom: 1px solid #e5e7eb;
            white-space: pre-line;
            color: #374151;
            font-size: 0.9375rem;
        }
        
        .release-assets {
            padding: 1rem;
        }
        
        .asset-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.5rem 0;
            border-bottom: 1px solid #e5e7eb;
        }
        
        .asset-item:last-child {
            border-bottom: none;
        }
        
        .asset-name {
            color: #1f2937;
            font-size: 0.9375rem;
            word-break: break-all;
            padding-right: 1rem;
        }
        
        .asset-download {
            color: var(--primary-color);
            text-decoration: none;
            display: flex;
            align-items: center;
            flex-shrink: 0;
        }
        
        .asset-download:hover {
            text-decoration: underline;
        }
        
        .release-expanded .release-icon {
            transform: rotate(180deg);
        }
        
        /* 提示消息 */
        .toast {
            position: fixed;
            top: 1rem;
            right: 1rem;
            z-index: 100;
            background-color: var(--primary-color);
            color: white;
            padding: 0.75rem 1.25rem;
            border-radius: 0.375rem;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
            opacity: 0;
            transition: opacity 0.3s;
        }
        
        .toast.show {
            opacity: 1;
        }
        
        .toast.error {
            background-color: #ef4444;
        }

        /* 隐藏元素 */
        .hidden {
            display: none;
        }
    </style>
</head>
<body>
    <div class="container mx-auto px-4 py-8">
        <!-- 头部 -->
        <header class="flex items-center justify-center mb-4 sm:mb-8">
            <h1 class="text-2xl sm:text-3xl font-bold bg-gradient-to-r from-indigo-600 to-purple-600 bg-clip-text text-transparent">
                KingDove's轻阅读服务
            </h1>
        </header>
        
        <!-- 标签页导航 -->
        <div class="flex mb-4 sm:mb-8 bg-white rounded-full p-1 shadow-sm overflow-x-auto">
            <button id="tab1" class="flex-1 py-2 sm:py-3 px-4 sm:px-6 rounded-full font-medium tab-active whitespace-nowrap">
                邀请码获取
            </button>
            <button id="tab2" class="flex-1 py-2 sm:py-3 px-4 sm:px-6 rounded-full font-medium text-gray-600 whitespace-nowrap">
                轻阅读客户端
            </button>
            <button id="tab3" class="flex-1 py-2 sm:py-3 px-4 sm:px-6 rounded-full font-medium text-gray-600 whitespace-nowrap">
                推荐书源
            </button>
        </div>
        
        <!-- 邀请码获取标签页 -->
        <div id="content1" class="glassmorphism p-4 sm:p-6">
            <!-- 自动获取部分 -->
            <div id="auto-section">
                <!-- 邀请码展示区 -->
                <div class="mb-6">
                    <h2 class="text-lg sm:text-xl font-semibold mb-3 sm:mb-4 flex items-center">
                        <i class="fas fa-ticket-alt mr-2 text-indigo-500"></i> 您的邀请码
                    </h2>
                    <div id="inviteCode" class="highlight-box p-3 sm:p-4 rounded-lg mb-3 sm:mb-4">
                        <div class="flex justify-between items-center">
                            <code class="text-base sm:text-lg font-mono font-bold text-indigo-600 break-all">
                                点击刷新按钮获取邀请码
                            </code>
                            <i class="fas fa-copy ml-2 text-gray-500"></i>
                        </div>
                    </div>
                    <p class="text-xs sm:text-sm text-gray-500">点击上方框体可自动复制邀请码</p>
                </div>
                
                <!-- 刷新按钮 -->
                <div class="text-center">
                    <button id="refreshBtn" class="refresh-btn text-white py-2 sm:py-3 px-4 sm:px-6 rounded-full font-medium">
                        <i class="fas fa-sync-alt mr-2"></i> 刷新邀请码
                    </button>
                </div>
            </div>

            <!-- 手动获取部分（初始隐藏） -->
            <div id="manual-section" class="manual-section hidden">
                <h3 class="text-lg font-semibold mb-3 text-red-600">
                    <i class="fas fa-exclamation-triangle mr-2"></i>自动获取失败，请手动获取
                </h3>
                
                <div class="step">
                    <span class="step-number">1</span>
                    <strong>点击下方按钮在新窗口打开邀请码页面</strong>
                    <p class="text-sm text-gray-600 mt-1">这将打开一个新窗口，您将直接看到您的邀请码。</p>
                    <a href="http://119.188.246.106:52000/getcode?code=445566" target="_blank" class="manual-btn">
                        <i class="fas fa-external-link-alt mr-2"></i>获取邀请码
                    </a>
                </div>
                
                <div class="step">
                    <span class="step-number">2</span>
                    <strong>或者复制以下链接到浏览器地址栏</strong>
                    <div class="link-box">
                        http://119.188.246.106:52000/getcode?code=445566
                    </div>
                    <button onclick="copyManualLink()" class="manual-btn">
                        <i class="fas fa-copy mr-2"></i>复制链接
                    </button>
                </div>
                
                <div class="step">
                    <span class="step-number">3</span>
                    <strong>下载HTML到本地运行</strong>
                    <p class="text-sm text-gray-600">如果您认为人工获取过于繁琐，您可以下载完整HTML文件到本地运行：</p>
                    <a href="https://gitee.com/KingDove/KingDoveRead/raw/master/index.html" target="_blank" class="manual-btn">
                        <i class="fas fa-external-link-alt mr-2"></i>跳转到HTML下载页
                    </a>
                    <p class="text-sm text-gray-600 mt-2">下载后双击打开即可使用，不受跨域限制影响。</p>
                </div>
                
                <div class="step">
                    <span class="step-number">4</span>
                    <strong>记录您的邀请码</strong>
                    <p class="text-sm text-gray-600">在新打开的页面中，您会看到类似以下格式的内容：</p>
                    <div class="link-box">
                        {"isSuccess":true,"errorMsg":"success","data":"您的邀请码"}
                    </div>
                    <p class="text-sm text-gray-600 mt-1">其中"data"字段后显示的字符串就是您的邀请码，请妥善保存。</p>
                </div>
            </div>
        </div>
        
        <!-- 轻阅读客户端标签页 -->
        <div id="content2" class="glassmorphism p-4 sm:p-6 hidden">
            <!-- 后端地址 -->
            <div class="mb-6 sm:mb-8 text-center">
                <h2 class="text-lg sm:text-xl font-semibold mb-3 sm:mb-4 flex items-center justify-center">
                    <i class="fas fa-server mr-2 text-indigo-500"></i> 后端地址
                </h2>
                <div id="serverAddress" class="highlight-box p-3 sm:p-4 rounded-lg mb-2 sm:mb-3">
                    <div class="flex justify-between items-center">
                        <code class="text-base sm:text-lg font-mono font-bold text-indigo-600 break-all">
                            http://119.188.246.106:52000/
                        </code>
                        <i class="fas fa-copy ml-2 text-gray-500"></i>
                    </div>
                </div>
                <p class="text-xs sm:text-sm text-gray-500">点击上方框体可自动复制地址</p>
            </div>
            
            <!-- 版本发布信息 -->
            <div class="mt-6 sm:mt-8">
                <h2 class="text-lg sm:text-xl font-semibold mb-3 sm:mb-4 flex items-center">
                    <i class="fas fa-clipboard-list mr-2 text-indigo-500"></i> 版本发布
                </h2>
                <div id="releasesContainer">
                    <div class="flex justify-center items-center py-4">
                        <div class="animate-spin rounded-full h-8 w-8 border-b-2 border-indigo-600 mr-3"></div>
                        <span class="text-gray-500">正在获取版本信息...</span>
                    </div>
                </div>
            </div>
        </div>

        <!-- 推荐书源标签页 -->
        <div id="content3" class="glassmorphism p-4 sm:p-6 hidden">
            <div class="mb-6">
                <h2 class="text-lg sm:text-xl font-semibold mb-4 text-center text-indigo-600">
                    <i class="fas fa-book-reader mr-2"></i> 推荐书源
                </h2>
                <div class="step mb-4">
                    <span class="step-number">1</span>
                    <strong>推荐书源下载地址</strong>
                    <div class="link-box mt-2">
                        https://gitee.com/KingDove/KingDoveRead/raw/master/%E6%8E%A8%E8%8D%90%E4%B9%A6%E6%BA%90.json
                    </div>
                    <a href="https://gitee.com/KingDove/KingDoveRead/raw/master/%E6%8E%A8%E8%8D%90%E4%B9%A6%E6%BA%90.json" 
                       download="推荐书源.json" 
                       class="manual-btn download-btn mt-2 inline-block">
                        <i class="fas fa-download mr-2"></i> 下载推荐书源
                    </a>
                    <button onclick="copyToClipboard('https://gitee.com/KingDove/KingDoveRead/raw/master/%E6%8E%A8%E8%8D%90%E4%B9%A6%E6%BA%90.json', '下载链接')" 
                            class="manual-btn mt-2">
                        <i class="fas fa-copy mr-2"></i> 复制下载链接
                    </button>
                </div>
                <div class="step">
                    <span class="step-number">2</span>
                    <strong>推荐书源地址发布页</strong>
                    <div class="link-box mt-2">
                        http://v8.czyl.cf:85/
                    </div>
                    <a href="http://v8.czyl.cf:85/" target="_blank" class="manual-btn mt-2 inline-block">
                        <i class="fas fa-external-link-alt mr-2"></i> 跳转到发布页
                    </a>
                    <button onclick="copyToClipboard('http://v8.czyl.cf:85/', '发布页链接')" 
                            class="manual-btn mt-2">
                        <i class="fas fa-copy mr-2"></i> 复制发布页链接
                    </button>
                </div>
            </div>
        </div>
    </div>

    <footer class="text-center py-4 sm:py-6 text-gray-500 text-sm">
        <p>KingDove—轻阅读</p>
    </footer>

    <!-- 提示消息 -->
    <div id="toast" class="toast">
        <div class="flex items-center">
            <i class="fas fa-check-circle mr-2"></i>
            <span id="toastMessage">已复制到剪贴板</span>
        </div>
    </div>

    <script>
        // 全局回调函数
        window.handleInviteCodeResponse = function(data) {
            const inviteCode = document.getElementById('inviteCode').querySelector('code');
            const refreshBtn = document.getElementById('refreshBtn');
            
            if (data && data.isSuccess) {
                inviteCode.textContent = data.data;
                showToast('邀请码获取成功');
                // 成功时隐藏手动获取部分
                document.getElementById('manual-section').classList.add('hidden');
            } else {
                inviteCode.textContent = '获取失败: ' + (data ? data.errorMsg : '服务器未响应');
                showToast('获取失败: ' + (data ? data.errorMsg : '服务器未响应'), false);
                // 失败时显示手动获取部分
                document.getElementById('manual-section').classList.remove('hidden');
            }
            
            refreshBtn.disabled = false;
            refreshBtn.innerHTML = '<i class="fas fa-sync-alt mr-2"></i> 刷新邀请码';
        };

        // 标签页切换
        document.getElementById('tab1').addEventListener('click', function() {
            document.getElementById('content1').classList.remove('hidden');
            document.getElementById('content2').classList.add('hidden');
            document.getElementById('content3').classList.add('hidden');
            document.getElementById('tab1').classList.add('tab-active');
            document.getElementById('tab2').classList.remove('tab-active');
            document.getElementById('tab3').classList.remove('tab-active');
        });
        
        document.getElementById('tab2').addEventListener('click', function() {
            document.getElementById('content1').classList.add('hidden');
            document.getElementById('content2').classList.remove('hidden');
            document.getElementById('content3').classList.add('hidden');
            document.getElementById('tab1').classList.remove('tab-active');
            document.getElementById('tab2').classList.add('tab-active');
            document.getElementById('tab3').classList.remove('tab-active');
            
            // 获取版本信息
            fetchReleases();
        });
        
        document.getElementById('tab3').addEventListener('click', function() {
            document.getElementById('content1').classList.add('hidden');
            document.getElementById('content2').classList.add('hidden');
            document.getElementById('content3').classList.remove('hidden');
            document.getElementById('tab1').classList.remove('tab-active');
            document.getElementById('tab2').classList.remove('tab-active');
            document.getElementById('tab3').classList.add('tab-active');
        });
        
        // 刷新邀请码 (直接请求方案)
        async function fetchInviteCode() {
            const inviteCode = document.getElementById('inviteCode').querySelector('code');
            const refreshBtn = document.getElementById('refreshBtn');
            
            inviteCode.textContent = '获取中...';
            refreshBtn.disabled = true;
            refreshBtn.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> 获取中';

            try {
                const response = await fetch('http://119.188.246.106:52000/getcode?code=445566');
                
                if (!response.ok) {
                    throw new Error('网络响应不正常');
                }
                
                const data = await response.json();
                handleInviteCodeResponse(data);
            } catch (error) {
                console.error('Fetch error:', error);
                handleFetchError();
            }
        }
        
        // 处理获取错误
        function handleFetchError() {
            const inviteCode = document.getElementById('inviteCode').querySelector('code');
            const refreshBtn = document.getElementById('refreshBtn');
            
            inviteCode.textContent = '获取失败: 请检查网络或使用手动获取';
            showToast('自动获取失败，请使用手动获取方法', false);
            refreshBtn.disabled = false;
            refreshBtn.innerHTML = '<i class="fas fa-sync-alt mr-2"></i> 刷新邀请码';
            
            // 显示手动获取部分
            document.getElementById('manual-section').classList.remove('hidden');
        }
        
        // 显示提示消息
        function showToast(message, isSuccess = true) {
            const toast = document.getElementById('toast');
            const toastMessage = document.getElementById('toastMessage');
            
            toastMessage.textContent = message;
            toast.className = isSuccess ? 'toast show' : 'toast show error';
            
            setTimeout(() => {
                toast.classList.remove('show');
            }, 2000);
        }
        
        // 复制功能 - 点击整个框体即可复制
        document.getElementById('inviteCode').addEventListener('click', function() {
            const text = this.querySelector('code').textContent.trim();
            if (text && !text.includes('点击') && !text.includes('获取')) {
                copyToClipboard(text, '邀请码');
            }
        });
        
        document.getElementById('serverAddress').addEventListener('click', function() {
            const text = this.querySelector('code').textContent.trim();
            copyToClipboard(text, '服务器地址');
        });

        // 复制手动获取链接
        function copyManualLink() {
            const text = 'http://119.188.246.106:52000/getcode?code=445566';
            copyToClipboard(text, '邀请码链接');
        }
        
        // 复制到剪贴板
        function copyToClipboard(text, type) {
            navigator.clipboard.writeText(text).then(() => {
                showToast(`${type}已复制到剪贴板`);
            }).catch(err => {
                console.error('复制失败:', err);
                // 备用复制方法
                const textarea = document.createElement('textarea');
                textarea.value = text;
                document.body.appendChild(textarea);
                textarea.select();
                try {
                    document.execCommand('copy');
                    showToast(`${type}已复制到剪贴板`);
                } catch (e) {
                    showToast('复制失败，请手动复制', false);
                }
                document.body.removeChild(textarea);
            });
        }
        
        // 获取版本信息
        function fetchReleases() {
            const releasesContainer = document.getElementById('releasesContainer');
            releasesContainer.innerHTML = `
                <div class="flex justify-center items-center py-4">
                    <div class="animate-spin rounded-full h-8 w-8 border-b-2 border-indigo-600 mr-3"></div>
                    <span class="text-gray-500">正在获取版本信息...</span>
                </div>
            `;
            
            fetch('https://api.github.com/repos/autobcb/read/releases')
                .then(response => {
                    if (!response.ok) throw new Error('网络响应不正常');
                    return response.json();
                })
                .then(releases => {
                    if (releases.length > 0) {
                        // 只取最近的3个版本
                        const recentReleases = releases.slice(0, 3);
                        let releasesHtml = '';
                        
                        recentReleases.forEach(release => {
                            // 格式化日期
                            const releaseDate = new Date(release.published_at);
                            const formattedDate = releaseDate.toLocaleDateString('zh-CN', {
                                year: 'numeric',
                                month: '2-digit',
                                day: '2-digit',
                                hour: '2-digit',
                                minute: '2-digit'
                            });
                            
                            // 处理Assets
                            let assetsHtml = '';
                            if (release.assets && release.assets.length > 0) {
                                release.assets.forEach(asset => {
                                    assetsHtml += `
                                        <div class="asset-item">
                                            <span class="asset-name">${asset.name}</span>
                                            <a href="${asset.browser_download_url}" class="asset-download" target="_blank" rel="noopener noreferrer">
                                                <i class="fas fa-download mr-1"></i> 下载
                                            </a>
                                        </div>
                                    `;
                                });
                            } else {
                                assetsHtml = '<p class="text-gray-500 py-2">此版本没有可下载的Assets</p>';
                            }
                            
                            releasesHtml += `
                                <div class="release-container">
                                    <div class="release-header" onclick="toggleRelease(this)">
                                        <div class="release-title">
                                            <i class="fas fa-tag mr-2"></i>
                                            ${release.tag_name}
                                            ${release.prerelease ? '<span class="ml-2 px-2 py-1 text-xs bg-yellow-100 text-yellow-800 rounded">预发布</span>' : ''}
                                        </div>
                                        <div class="flex items-center">
                                            <span class="release-date mr-3">${formattedDate}</span>
                                            <i class="release-icon fas fa-chevron-down"></i>
                                        </div>
                                    </div>
                                    <div class="release-content">
                                        <div class="release-notes">
                                            ${release.body ? release.body.replace(/\n/g, '<br>') : '此版本没有发行说明'}
                                        </div>
                                        <div class="release-assets">
                                            <h4 class="font-medium mb-2 text-gray-700">下载资源</h4>
                                            ${assetsHtml}
                                        </div>
                                    </div>
                                </div>
                            `;
                        });
                        
                        releasesContainer.innerHTML = releasesHtml;
                    } else {
                        releasesContainer.innerHTML = `
                            <div class="text-center py-4">
                                <p class="text-gray-500">暂无可用版本</p>
                                <p class="text-sm text-gray-500 mt-2">
                                    请访问 
                                    <a href="https://github.com/autobcb/read/releases" 
                                       class="text-indigo-600 hover:underline" 
                                       target="_blank" rel="noopener noreferrer">GitHub Releases</a>
                                </p>
                            </div>
                        `;
                    }
                })
                .catch(error => {
                    releasesContainer.innerHTML = `
                        <div class="text-center py-4">
                            <p class="text-red-500">获取版本信息失败: ${error.message}</p>
                            <p class="text-sm text-gray-500 mt-2">
                                请访问 
                                <a href="https://github.com/autobcb/read/releases" 
                                   class="text-indigo-600 hover:underline" 
                                   target="_blank" rel="noopener noreferrer">GitHub Releases</a>
                            </p>
                        </div>
                    `;
                });
        }
        
        // 切换发行版本的展开/折叠状态
        window.toggleRelease = function(header) {
            const container = header.parentElement;
            const content = header.nextElementSibling;
            const icon = header.querySelector('.release-icon');
            
            container.classList.toggle('release-expanded');
            content.classList.toggle('expanded');
            
            if (content.classList.contains('expanded')) {
                icon.classList.remove('fa-chevron-down');
                icon.classList.add('fa-chevron-up');
            } else {
                icon.classList.remove('fa-chevron-up');
                icon.classList.add('fa-chevron-down');
            }
        };

        // 初始加载邀请码
        document.getElementById('refreshBtn').addEventListener('click', fetchInviteCode);
        fetchInviteCode();
    </script>
</body>
</html>
